package com.sam.jifenbao;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.Toast;

import com.sam.widget.headerBar.BaseHeaderView;
import com.sam.widget.headerBar.LeftTextTitleRightImageBar;

public abstract class BaseHeaderActivity extends BaseActivity{

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.setContentView(R.layout.base_activity_layout);
    }

    @Override
    public void setContentView(@LayoutRes int layoutResID) {
        FrameLayout pageContent = (FrameLayout) findViewById(R.id.page_content);
        pageContent.removeAllViews();
        View.inflate(this,layoutResID,pageContent);
    }

    public LeftTextTitleRightImageBar getHeaderView(){
        return (LeftTextTitleRightImageBar) findViewById(R.id.header);
    }

}
